package p.ithorns.tools.excel.exception;

/**
 * FieldValidateException
 * Excel字段校验异常
 *
 * @author liuhaitao
 * @version 1.0.0
 * @date 2022/5/7 18:06
 */
public class FieldValidateException extends RuntimeException {

    /**
     * 行号
     */
    private Integer rowIndex;
    /**
     * 列号
     */
    private Integer columnIndex;
    /**
     * 列名
     */
    private String columnName;


    public FieldValidateException(Integer rowIndex, Integer columnIndex, String columnName, String message) {
        super(message);
        this.rowIndex = rowIndex;
        this.columnIndex = columnIndex;
        this.columnName = columnName;
    }

    public FieldValidateException(Integer rowIndex, Integer columnIndex, String columnName,
                                  String message, Throwable cause) {
        super(message, cause);
        this.rowIndex = rowIndex;
        this.columnIndex = columnIndex;
        this.columnName = columnName;
    }

    public Integer getRowIndex() {
        return rowIndex;
    }

    public void setRowIndex(Integer rowIndex) {
        this.rowIndex = rowIndex;
    }

    public Integer getColumnIndex() {
        return columnIndex;
    }

    public void setColumnIndex(Integer columnIndex) {
        this.columnIndex = columnIndex;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }
}
